#pragma once

#include "winsvc.h"
class CSysLoader
{
private: 
	static	CSysLoader* m_pInstance; 
	BOOL	m_bIsLoaded;
	char	lpszDriverName[MAX_PATH];
	char	lpszDriverPath[MAX_PATH];
	CString	m_strLastError;
 
	SC_HANDLE HandleCreateSys;
	SC_HANDLE hServiceSCM; 
public:
	static CSysLoader* CreateInstance();
	CSysLoader(void);
	~CSysLoader(void);
	BOOL LoadNTDriver();
	BOOL UnNTDriver();
	inline BOOL IsLoaded()
	{
		return m_bIsLoaded;
	};

	inline CString GetErrorStr()
	{
		return m_strLastError;
	};

	inline void SetParams(char* name,char* path)
	{ 
		_tcscpy(lpszDriverName,name);
		_tcscpy(lpszDriverPath,path);
	}
};
